#include "processBar.h"
#include <unistd.h>

typedef void (*callback)(int);

void processbar(callback cb)
{
    int total = 1000;
    int curr = 0;
    while (curr <= total)
    {
        cb(curr*100 / total);
        curr += 10;
    }
    printf("\n");
}


int main()
{
    printf("task1:\n");
    processbar(initBar);
    printf("task2:\n");
    processbar(initBar);
    printf("task3:\n");
    processbar(initBar);
    

    return 0;
}


